package com.game.quartz.task;

import com.game.business.service.HxSevice;
import com.game.common.core.domain.entity.SysUser;
import com.game.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.game.common.utils.StringUtils;

import java.util.List;

/**
 * 定时任务调度测试
 *
 * @author ruoyi
 */
@Component("ryTask")
public class RyTask
{




    public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
    {
        System.out.println(StringUtils.format("执行多参方法： 字符串类型{}，布尔类型{}，长整型{}，浮点型{}，整形{}", s, b, l, d, i));
    }

    public void ryParams(String params)
    {
        System.out.println("执行有参方法：" + params);
    }

    public void ryNoParams()
    {
        System.out.println("执行无参方法");
    }
    @Autowired
    private ISysUserService userService;

    @Autowired
    private HxSevice hxSevice;
    /**
     *
     * 注册环信
     */
    public   void  registerHunxin(){
        SysUser sysUser =new SysUser();
        List<SysUser> userList = userService.selectUserListApp(sysUser);
        for (int i = 0; i < userList.size(); i++) {
            SysUser sysUser1 = userList.get(i);
            hxSevice.createUser(sysUser1.getUserId()+"");
        }
    }
}
